package com.yunbiao.ybbusstopplate.utils.net;

import static android.content.Context.ALARM_SERVICE;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.util.Log;

import com.yunbiao.ybbusstopplate.base.APP;
import com.yunbiao.ybbusstopplate.base.Constants;
import com.yunbiao.ybbusstopplate.utils.SmdtUtils;

import java.io.DataOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;

public class ApkUpdate {

    private static final String TAG = "apkUpdate";

    //apk路径

    //临时apk名
    // TODO: 19/8/2024 apk名称 应该问 服务器
    private static final String apkName = "ThreeAreaV1.1.10_202408191456.apk";

    private static APP app = null;


    /**
     * 安装apk
     */
    public static boolean installApk(){

//        String apkFile = apkPath + apkName;
//
//        String installCommand = "pm install -r /storage/emulated/0/guideBoardAPP/resource/apks/ThreeAreaV1.1.10_202408191456.apk; ";
//
//        String sleepCommand = "sleep 30; ";
//
//        String restartAppCommand = "am start -n com.yunbiao.ybbusstopplate/.ui.activity.HomeActivity";
//
//        String runCommand = installCommand + sleepCommand + restartAppCommand;

        //SmdtUtils.getInstance().runCommand(runCommand);

        //SmdtUtils.getInstance().installApp(new File(apkFile));


        return true;
    }

    public static boolean getApk(){



        return true;
    }







}
